package tech.yangzhijie.blog.admin.config.authentication;

import lombok.Builder;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * @Author: 探险家劫
 * @Date: 2021/11/18 21:16
 */
@Data
@Builder(toBuilder = true)
public class SecurityUser implements UserDetails {

    private static final long serialVersionUID = 22066717919855304L;
    private String username;
    private String password;
    @Builder.Default
    private boolean accountNonExpired = true;
    @Builder.Default
    private boolean accountNonLocked = true;
    @Builder.Default
    private boolean credentialsNonExpired = true;
    private boolean enabled;
    private Collection<? extends GrantedAuthority> authorities;
}
